/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.miracleteam.miracle.utils;

import com.miracleteam.miracle.entities.Sanphamcotaicuahang;
import java.util.ArrayList;
import java.util.List;
import org.apache.tapestry5.OptionGroupModel;
import org.apache.tapestry5.OptionModel;
import org.apache.tapestry5.util.AbstractSelectModel;

/**
 *
 * @author DangKhoa
 */
public class SanPhamCoTaiCuaHangSelectModel extends AbstractSelectModel{

    private List<Sanphamcotaicuahang> dsSanPhamCoTaiCuaHang;
    public SanPhamCoTaiCuaHangSelectModel(List<Sanphamcotaicuahang> ds)
    {
        this.dsSanPhamCoTaiCuaHang=ds;
    }
    public List<OptionGroupModel> getOptionGroups() {
        return null;
    }

    public List<OptionModel> getOptions() {
        List<OptionModel> list =new ArrayList<OptionModel>();
        for(Sanphamcotaicuahang sp :dsSanPhamCoTaiCuaHang)
        {
            list.add(new SanPhamCoTaiCuaHangOptionModel(sp));
        }
        return list;
    }
    
}
